﻿Public Class ComprobarNumeros
    Dim numero As Double

    Private Sub btn_Comprobar_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Comprobar.Click
        Try
            numero = Me.txtNumero.Text
            If numero < 0 Then
                MsgBox("El número es negativo.")
            End If

            If numero > 0 Then
                MsgBox("El número es positivo.")
            End If
            If numero = 0 Then
                MsgBox("El número es cero.")
            End If

        Catch ex As Exception
            MsgBox("Debe introducir un número, no letras.")
        End Try

    End Sub

    Private Sub btn_Salir_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Salir.Click
        End
    End Sub

    Private Sub btn_Otro_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btn_Otro.Click
        Me.txtNumero.Clear()
        Me.txtNumero.Focus()
    End Sub

End Class
